package com.ccys.app.controller;

import com.ccys.common.vo.ResponseResultApp;
import com.ccys.db.dto.app.childTurn16Screen.InviteChildDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author：XLY
 * @Date：2024/2/1 0001
 */
@RestController
@RequestMapping("/childTurn")
@Api(tags = "Child turn 16 Screen")
public class ChildTurn16ScreenController {

    @ApiOperation("Child turn 16 Screen/1")
    @PostMapping("InviteChild")
    @Transactional
    public ResponseResultApp inviteChild(@RequestBody InviteChildDto dto){
        //生成inviteCode
        //修改member的信息
        //添加到family
        //发送邮件
        return ResponseResultApp.success("Your invite to Child 1 has been sent!");
    }

}
